﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HelloMinasan.Domain;
using System.ComponentModel.DataAnnotations;
using HelloMinasan.Domain.Dtos;
using HelloMinasan.Resources;
using HelloMinasan.UserDefinedType.Dtos;

namespace HelloMinasan.Web.ViewModels
{
    public class ArticleModel
    {
        public ArticleModel()
        {
        }

        public int Id { get; set; }
        public string Title { get; set; }
        [Required]
        public string Content { get; set; }
        public DateTime CreatedTime { get; set; }
        public DateTime UpdatedTime { get; set; }
        public User Author { get; set; }
        public bool IsOwner { get; set; }
        public bool IsSubscriber { get; set; }
        public Speciality CriticalSpeciality { get; set; }
        public Speciality Addition1Speciality { get; set; }
        public Speciality Addition2Speciality { get; set; }
        public string CriticalSpecialityName { get; set; }
        public string Addition1SpecialityName { get; set; }
        public string Addition2SpecialityName { get; set; }
        public int CriticalSpecialityId { get; set; }
        public int Addition1SpecialityId { get; set; }
        public int Addition2SpecialityId { get; set; }
        public bool MyMemberSee { get; set; }
        public bool HasImage { get; set; }
        public string ArticleUploadedImg { get; set; }
        public int TotalComments { get; set; }

        public int CurrentUserId { get; set; }
        public UserType CurrentUserType { get; set; }
        public bool CurrentUserHasAvatar { get; set; }
        private string currentUserFullName = string.Empty;
        public string CurrentUserFullName 
        {
            get
            {
                return string.Format(Resource.Common_Dr + " {0}", this.currentUserFullName);
            }

            set
            {
                this.currentUserFullName = value;
            }
        }
        public string CurrentUserMainSpeciality { get; set; }
        public IList<ArticleCommentDto> ListArticleCommentDto { get; set; }

        public int ActivityStreamId { get; set; }
    }
}